Retrieve available COM ports in PowerShell using WMI or registry queries for automated device detection and scripting.